import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: "/",//缺省登录页
    component: ()=>import("@/views/Loan_Login.vue")
  },
    //下面是用户的Layout
  {
    path: "/user_Layout",//管理员Layout
    component: ()=>import("@/components/User_Layout.vue"),
    children:[
      {
        path: "homeUser",//首页
        component: ()=>import("@/views/HomeUser.vue")
      },
      {
        path: "user_Personal_Information",//用户个人信息
        component: ()=>import("@/views/User_Personal_Information.vue")
      },
      {
        path: "user_Loan_Application",//贷款申请
        component: ()=>import("@/views/User_Loan_Application.vue")
      },
      {
        path: "user_Repay",//还款
        component: ()=>import("@/views/User_Repay.vue")
      },
      {
        path: "user_LoanType",//还款
        component: ()=>import("@/views/User_LoanType.vue")
      }
    ]
  },

  //下面是管理员的Layout
  {
    path: "/admin_Layout2",//管理员Layout
    component: ()=>import("@/components/Admin_Layout2.vue"),
    children:[
      {
        path: "home",//首页
        component: ()=>import("@/views/Home.vue")
      },
      {
        path: "admin_Personal_Information",//管理员个人信息
        component: ()=>import("@/views/Admin_Personal_Information.vue")
      },
      {
        path: "admin_Information_Manager",//管理员管理用户信息
        component: ()=>import("@/views/Admin_Information_Manager.vue")
      },
      {
        path: "admin_LoanType",//产品类型
        component: ()=>import("@/views/Admin_LoanType.vue")
      },
      {
        path: "admin_Loan_Check",//货款核审
        component: ()=>import("@/views/Admin_Loan_Check.vue")
      },
      {
        path: "admin_Bank",//贷款监测
        component: ()=>import("@/views/Admin_Bank.vue")
      },
      {
        path: "admin_Loan_Monitor",//贷款监测
        component: ()=>import("@/views/Admin_Loan_Monitor.vue")
      },
    ]
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
